const arr = [
  "9:00",
  "9:30",
  "10:00",
  "10:30",
  "11:00",
  "11:30",
  "12:00",
  "12:30",
  "13:00",
  "13:30",
  "14:00",
  "14:30",
  "15:00",
  "15:30",
  "16:00",
  "16:30",
  "17:00",
  "17:30",
];

const selectList = [
  { start: "9:00", end: "10:00" },
  { start: "10:30", end: "11:00" },
];

let links = [];
for (let i = 0; i < selectList.length; i++) {
  let startIndex = arr.indexOf(selectList[i].start);
  let endIndex = arr.indexOf(selectList[i].end);
  while (endIndex - startIndex) {
    links.push(startIndex);
    startIndex++;
  }
}

console.log(links);

function disableIndex(index) {
  return !links.includes(index);
}
console.log(disableIndex(2));
